package com.zk.ppa.service.impl;

import com.zk.ppa.dao.po.Production;
import com.zk.ppa.dao.repository.ProductionRepository;
import com.zk.ppa.service.ProductionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author fengq
 */
@Service
public class ProductionServiceImpl implements ProductionService {
    @Autowired
    private ProductionRepository productionRepository;

    @Override
    public Boolean saveProduction(Production production) {
        return productionRepository.save(production);
    }

    @Override
    public Boolean updateProductionById(Production production) {
        return productionRepository.updateById(production);
    }

    @Override
    public Boolean deleteProductionById(Long id) {
        return productionRepository.removeById(id);
    }

    @Override
    public Boolean deleteBatchProductionByIds(List<Long> ids) {
        return productionRepository.removeByIds(ids);
    }
}
